#ifndef XWINDOWBASE_H
#define XWINDOWBASE_H

class XWindow
{
	public:
		XWindow(XResourcesManager *data);
		void SetVisible();
		void SetVisible(bool visible);
		bool visible();

		bool isStatic();

		bool CheckPosition(int mouseX, int mouseY);
        void DragWindow(int mouseX, int mouseY);
        void ResetDrag();

		virtual void Draw();

		virtual void CheckState(const sf::Input &input);
		virtual void CheckEvent(const sf::Event &Event);
		virtual void CheckQuery() {};

	protected:
		sf::RenderWindow* x_app;
		XResourcesManager* x_data;

		sf::View x_view;

		sf::Sprite x_windowBackground;

		std::map<std::string, XWidget*> x_widgets;

		bool x_visible;

		bool x_static;

		int x_positionX;
		int x_positionY;
		int x_width;
		int x_height;

		int x_startDragX;
		int x_startDragY;

		bool x_manualOverride;
};

#endif